package com.wdc.simple.day01;

import java.util.ArrayList;
import java.util.Scanner;

public class Main03 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        String str = scan.nextLine();
        char[] chars = str.toCharArray();
        ArrayList<Object> list = new ArrayList<>();

        int count = 0;
        for (int i = 1; i < chars.length ; i++) {
            if (chars[i - 1] == chars[i]) {
                count++;
            } else {
                list.add(chars[i]);
                list.add(count+1);
                count = 0;
            }
            if (i  == chars.length -1){
                list.add(chars[i]);
                list.add(count+1);
            }
        }
        System.out.println(list);
        scan.close();
    }
}
